package server;

import common.ConnectionManager;
import common.Message;
import common.MessageType;

public class BackupServer {
	
	private String ip;
	private int port;
	private ConnectionManager connManager = null;
	
	public BackupServer(String ip, int port, ConnectionManager cM) {
		this.ip = ip;
		this.port = port;
		this.connManager = cM;
	}

	public String getIp() {
		return ip;
	}

	public int getPort() {
		return port;
	}

	public ConnectionManager getConnManager() {
		return connManager;
	}
	
	public void close() {
		Message disconnect = new Message(MessageType.DISCONNECT, "Bye", false);
		connManager.sendMessage(disconnect);
	}
	
}
